package edu.ucdavis.gwt.gis.client.extras;

import com.google.gwt.user.client.ui.Image;

public class LegendIcon extends Image {	
	
	public LegendIcon(String data, String contentType, int height, int width ){
		super();
		//getElement().getStyle().setProperty("background", "url(\"data:"+contentType+";base64,"+data+"\") no-repeat scroll 0 0");
		getElement().setAttribute("border", "0");
		//getElement().setAttribute("src", GWT.getModuleBaseURL()+"clear.cache.gif");
		if( contentType.isEmpty() ) contentType = "image/png";
		setUrl("data:"+contentType+";base64,"+data);
		//setSize( width+"px", height+"px");
	}
	
}
